package cn.col.gszf.service;

import cn.col.gszf.model.UserVoteGroupDay;
import cn.col.gszf.pojo.UserVotes;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.HashMap;
import java.util.List;

/**
 * @author wanghong
 * @created 2024-06-23
 * @description 用户投票接口
 **/
public interface UserVotesService {

    /**
    * @Description
    * @Param:
    * @return:
    * @Author: wanghong
    * @Date: 2024/6/23
    */
    boolean checkUser(String ip, String vid, Integer channelId);

    /**
    * @Description 根据vid和channelId
    * @Param: vid,channelId
    * @return: List<UserVotes>
    * @Author: wanghong
    * @Date: 2024/6/23
    */
    List<UserVotes> getByVIDAndChannelId(String vid, Integer channelId);

    UserVotes save(UserVotes userVotes);

    List<UserVotes> findAllUserVotes(Page<UserVotes> rowPage);

    HashMap<String, Integer> getTodayResult();

    List<UserVoteGroupDay> calByDay();

    List<UserVoteGroupDay> calByDayAndChannelId(Integer channelId);
}
